﻿using UnityEngine;
using System.Collections;

public class ActionButton2D: Touchable2D{

	//The action to perform when this button is clicked
	public BaseAction ClickAction;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

	/// <summary>
	/// Handles a click on this action button
	/// </summary>
	/// <param name="worldPoint">Point in the world where the click occurred</param>
	public override void HandleClick(Vector3 worldPoint){
		Debug.Log ("Click Action Button 2D");

		if(ClickAction != null){
			ClickAction.ExecuteAction();
		}
	}
}
